<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" />
    <title>工业互联网标识自助服务平台</title>
    <style type="text/css">

        body{
            line-height: 1.5;
            font-family: -apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;
            font-variant: tabular-nums;
            font-feature-settings: "tnum";
            margin: 0px;
        }

        .describe {
            float: left;
            display: inline-block;
            padding: 14px 0;
            color: rgba(153, 153, 153, 1);
            width: 85px;
            text-align: left;
        }

        .details {
            padding: 15px 0;
            padding-left: 105px;
            color: rgba(51, 51, 51, 1);
        }

        .com {
            border-bottom: 1px solid rgba(229, 229, 229, 1);
            font-size: 14px;
        }

        .clearfix {
            clear: both;
        }
    </style>
</head>

<body>
    <div style="background:#F4F2F2 ">
        <div>
            <div style="text-align: center; background: white; padding: 14px ">
                <div>
                    <img style=" width: 189px " src="{{ url_for('static',filename='img/logo.png') }}" />
                </div>
                <div style="font-size: 16px;font-weight: bold ;padding-top: 14px ">
                    <spanstyle="margin-left: 8 ">工业互联网标识自助服务平台</span>
                </div>
                <div style="margin-top: 10px; border-top: 1px solid rgba(229, 229, 229, 1) " ></div>
                <div style="font-size: 12px;padding-top: 8px ">
                    <span>标识码：</span>
                    <span style=" word-wrap: break-word ">{{ handle_code }}</span>
                </div>
            </div>
            <div style="margin-top: 10px; background: white; text-align: center; width: 100%;"></div>
            {# 有单品情况 #}
            {% if singleArrayLen > 0 %}
                <div style=" height: 100%; width :100%; border-bottom: 10px solid rgba(245, 245, 245, 1); background: white">
                    {% if singleHeadImg %}
                        {% for img in singleHead.product_picture %}
                            <div style="padding: 10px">
                                <img src="http://ipsp.gdsinsing.com{{img}}" style=" width: 100% " />
                            </div>
                        {% endfor %}
                    {% endif %}
                    <div style="display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding: 10px; background: white;">
                        <div style="font-weight: bold; display: flex; flex-direction: row; justify-content: space-around; align-items: center;">
                            <span>{{singleHead.handle_name}}</span>
                        </div>
                    </div>
                    <div style=" background: white; padding: 10px">
                        {% for item in singleArray %}
                            {% if item.sign_type == 'TEXT' %}
                                {% if item.sign_key == 'custom_attribute' %}
                                    {% for val in item.sign_value %}
                                        {% if loop.length != 0 %}
                                            <div class="com">
                                                <div class="describe">{{val.label}}</div>
                                                {% if val.value is string %}
                                                    <div class="details">{{val.value}}</div>
                                                {% else %}
                                                    {% for i in val.value %}
                                                        <img src="http://ipsp.gdsinsing.com{{i}}" alt="">
                                                    {% endfor %}
                                                {% endif %}
                                                <div class="clearfix"></div>
                                            </div>
                                        {% endif %}
                                    {% endfor %}
                                {% else %}
                                    <div class="com">
                                        <div class='describe'>{{item.sign_name}}</div>
                                        <div class="details">
                                            {{item.sign_value}}
                                        </div>
                                        <div class="clearfix"></div>
                                    </div>
                                {% endif %}
                            {% endif %}
                            {% if item.sign_type == 'Image' %}
                                <div class="com">
                                        <div class='describe'>{{item.sign_name}}</div>
                                    <div style=" padding-left: 10px ">
                                        <img src="http://ipsp.gdsinsing.com{{item.sign_value}}" style=" width: 100% " />
                                    </div>
                                    <div class="clearfix"></div>
                                </div>
                            {% endif %}
                        {% endfor %}
                    </div>
                </div>
            {% endif %}
            
            {# 有品类情况 #}
            {% if categoryArrayLen > 0 %}
                <div style=" height: 100%; width :100%; border-bottom: 10px solid rgba(245, 245, 245, 1); background: white">
                    {% if categoryHeadImg %}
                        {% for img in categoryHead.category_picture %}
                            <div style="padding: 10px">
                                <img src="http://ipsp.gdsinsing.com{{img}}" style=" width: 100% " />
                            </div>
                        {% endfor %}
                    {% endif %}
                    <div style="display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding: 10px; background: white;">
                        <div style="font-weight: bold; display: flex; flex-direction: row; justify-content: space-around; align-items: center;">
                            <span>{{categoryHead.handle_name}}</span>
                        </div>
                    </div>
                    <div style=" background: white; padding: 10px">
                        {% for item in categoryArray %}
                            {% if item.sign_type == 'TEXT' %}
                                {% if item.sign_key == 'custom_attribute' %}
                                    {% for val in item.sign_value %}
                                        {% if loop.length != 0 %}
                                            <div class="com">
                                                <div class="describe" >{{val.label}}</div>
                                                {% if val.value is string %}
                                                    <div class="details">{{val.value}}</div>
                                                {% else %}
                                                    {% for i in val.value %}
                                                        <img src=src="http://ipsp.gdsinsing.com{{i}}" alt="">
                                                    {% endfor %}
                                                {% endif %}
                                                <div class="clearfix"></div>
                                            </div>
                                        {% endif %}
                                    {% endfor %}
                                {% else %}
                                    <div class="com">
                                        <div class='describe'>{{item.sign_name}}</div>
                                        <div class="details">
                                            {{item.sign_value}}
                                        </div>
                                        <div class="clearfix"></div>
                                    </div>
                                {% endif %}
                            {% endif %}
                            {% if item.sign_type == 'Image' %}
                                <div class="com">
                                    <div class='describe'>{{item.sign_name}}</div>
                                    <div style=" padding-left: 10px ">
                                        <img src="http://ipsp.gdsinsing.com{{item.sign_value}}" style="width: 100%" />
                                    </div>
                                    <div class="clearfix"></div>
                                </div>
                            {% endif %}
                        {% endfor %}
                    </div>
                </div>
            {% endif %}

            {# 有企业情况 #}
            {% if companyArrayLen > 0 %}
                <div style=" height: 100%; width :100%; border-bottom: 10px solid rgba(245, 245, 245, 1); background: white">
                    {% if companyHeadImg %}
                        {% for img in companyHead.company_picture %}
                            <div style="padding: 10px">
                                <img src="http://ipsp.gdsinsing.com{{img}}" style=" width: 100% " />
                            </div>
                        {% endfor %}
                    {% endif %}
                    <div style="display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding: 10px; background: white;">
                        <div style="font-weight: bold; display: flex; flex-direction: row; justify-content: space-around; align-items: center;">
                            <span>{{companyHead.handle_name}}</span>
                        </div>
                    </div>
                    <div style=" background: white; padding: 10px">
                        {% for item in companyArray %}
                                {% if item.sign_value != '' %}
                                    {% if item.sign_type == 'TEXT' %}
                                        {% if item.sign_key == 'custom_attribute' %}
                                            {% for val in item.sign_value %}
                                                {% if loop.length != 0 %}
                                                    <div class="com">
                                                        <div class="describe">{{val.label}}</div>
                                                        {% if val.value is string %}
                                                            <div class="details">{{val.value}}</div>
                                                        {% else %}
                                                            {% for i in val.value %}
                                                                <img src="http://ipsp.gdsinsing.com{{i}}" alt="">
                                                            {% endfor %}
                                                        {% endif %}
                                                        <div class="clearfix"></div>
                                                    </div>
                                                {% endif %}
                                            {% endfor %}
                                        {% elif item.sign_key == 'address' %}
                                                <div class="com">
                                                    <div class='describe'>{{item.sign_name}}</div>
                                                    <div class="details">
                                                        {{item.sign_value.province}}{{item.sign_value.province}}{{item.sign_value.city}}{{item.sign_value.detail}}
                                                    </div>
                                                    <div class="clearfix"></div>
                                                </div>
                                        {% else %}
                                            <div class="com">
                                                <div class='describe'>{{item.sign_name}}</div>
                                                <div class="details">
                                                    {{item.sign_value}}
                                                </div>
                                                <div class="clearfix"></div>
                                            </div>
                                        {% endif %}
                                    {% endif %}
                                    {% if item.sign_type == 'Image' %}
                                        <div class="com">
                                            <div class='describe'>{{item.sign_name}}</div>
                                            <div style=" padding-left: 10px ">
                                                <img src="http://ipsp.gdsinsing.com{{item.sign_value}}" style=" width: 100% " />
                                            </div>
                                            <div class="clearfix"></div>
                                        </div>
                                    {% endif %}
                            {% endif %}
                        {% endfor %}
                    </div>
                </div>
            {% endif %}
        </div>
    </div>
</body>

</html>